﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://dev.buwog.at/schemas/ChartBuilder/v1" elementFormDefault="qualified" targetNamespace="http://dev.buwog.at/schemas/ChartBuilder/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ChartConfiguration" nillable="true">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="1" maxOccurs="1" name="DataSource" nillable="true" type="tns:DataSourceConfiguration" />
        <xs:element minOccurs="0" maxOccurs="1" name="Series" type="tns:ArrayOfSeriesConfiguration" />
        <xs:element minOccurs="0" maxOccurs="1" form="unqualified" name="Design">
          <xs:complexType>
            <xs:sequence>
              <xs:any />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="format" type="tns:ChartImageFormat" use="required" />
      <xs:attribute name="width" type="xs:int" use="required" />
      <xs:attribute name="height" type="xs:int" use="required" />
    </xs:complexType>
  </xs:element>
  <xs:complexType name="DataSourceConfiguration">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="ConnectionString" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="SqlCommand" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="ArrayOfSeriesConfiguration">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Series" nillable="true" type="tns:SeriesConfiguration" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="SeriesConfiguration">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="ChartType" type="tns:SeriesChartType" />
      <xs:element minOccurs="0" maxOccurs="1" name="XAxisTitle" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="XValueColumn" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="YAxisTitle" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="YValueColumn" type="xs:string" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" />
    <xs:attribute name="dataSource" type="xs:string" />
    <xs:attribute name="legendText" type="xs:string" />
  </xs:complexType>
  <xs:simpleType name="SeriesChartType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Point" />
      <xs:enumeration value="FastPoint" />
      <xs:enumeration value="Bubble" />
      <xs:enumeration value="Line" />
      <xs:enumeration value="Spline" />
      <xs:enumeration value="StepLine" />
      <xs:enumeration value="FastLine" />
      <xs:enumeration value="Bar" />
      <xs:enumeration value="StackedBar" />
      <xs:enumeration value="StackedBar100" />
      <xs:enumeration value="Column" />
      <xs:enumeration value="StackedColumn" />
      <xs:enumeration value="StackedColumn100" />
      <xs:enumeration value="Area" />
      <xs:enumeration value="SplineArea" />
      <xs:enumeration value="StackedArea" />
      <xs:enumeration value="StackedArea100" />
      <xs:enumeration value="Pie" />
      <xs:enumeration value="Doughnut" />
      <xs:enumeration value="Stock" />
      <xs:enumeration value="Candlestick" />
      <xs:enumeration value="Range" />
      <xs:enumeration value="SplineRange" />
      <xs:enumeration value="RangeBar" />
      <xs:enumeration value="RangeColumn" />
      <xs:enumeration value="Radar" />
      <xs:enumeration value="Polar" />
      <xs:enumeration value="ErrorBar" />
      <xs:enumeration value="BoxPlot" />
      <xs:enumeration value="Renko" />
      <xs:enumeration value="ThreeLineBreak" />
      <xs:enumeration value="Kagi" />
      <xs:enumeration value="PointAndFigure" />
      <xs:enumeration value="Funnel" />
      <xs:enumeration value="Pyramid" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ChartImageFormat">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Jpeg" />
      <xs:enumeration value="Png" />
      <xs:enumeration value="Bmp" />
      <xs:enumeration value="Tiff" />
      <xs:enumeration value="Gif" />
      <xs:enumeration value="Emf" />
      <xs:enumeration value="EmfDual" />
      <xs:enumeration value="EmfPlus" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>